﻿using System.ComponentModel.Composition ;
using System.Windows ;

namespace PrismExample.Weather
{
    [Export]
    public partial class View 
    {
        public View ( )
        {
            this.InitializeComponent( ) ;
            this.Loaded += new RoutedEventHandler( View_Loaded ) ;

        }

        void View_Loaded ( object sender, RoutedEventArgs e )
        {
            if ( System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable( ) )
            {
                this.Weather.Text = "Sunny Days" ;
            }
            else
            {
                this.Weather.Text = "Offline" ;
            }
        }

    }
}